﻿SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON

GO


CREATE PROCEDURE [dbo].[bhp_temp_ModBlogStructure]
AS
BEGIN

	DECLARE
		@BlogGroupId			INT,
		@LidColumn				INT,
		@ContentColumn		INT
		
	SELECT @BlogGroupId = id FROM n_Tree WHERE name='BLOG_POSTS' AND parent = 0
	SELECT @LidColumn = id FROM n_Tree WHERE parent = @BlogGroupId AND name = 'lid'
	SELECT @ContentColumn = id FROM n_Tree WHERE parent = @BlogGroupId AND name = 'content'

	UPDATE
		bht_Columns
	SET
		CustomEditControl = NULL
	WHERE
		ColumnId = @LidColumn
		
	UPDATE
		bht_Columns 
	SET
		DisplayName = 'Treść',
		Description = 'Treść posta'
	WHERE
		ColumnId = @ContentColumn
		
	
END
GO

EXEC [bhp_temp_ModBlogStructure]
GO

DROP PROCEDURE [bhp_temp_ModBlogStructure]